home *** CD-ROM | disk | FTP | other *** search
- Path: news.halcyon.com!usenet
- From: normanb@halcyon.com (Norm Bryar)
- Newsgroups: comp.lang.c++
- Subject: Re: Compile problem
- Date: Thu, 01 Feb 1996 16:47:58 GMT
- Organization: Northwest Nexus Inc.
- Message-ID: <4eqqr0$d8b@news.halcyon.com>
- References: <4eol9k$gqf@fred.uswnvg.com>
- NNTP-Posting-Host: blv-pm2-ip25.halcyon.com
- X-Newsreader: Forte Free Agent 1.0.82
-
- It might mean that a variable was declared at a level of scope, but
- declared with an initialization that may never execute because of a
- break in the flow of control. The compiler has problems making space
- on the stack and initializing that space in such cases, but I've no
- solid feel for why. For example
-
- void Un::Deux( int arg )
- {
- switch( arg )
- {
- case 0:
- int oopse=10; // jump past initializer possible
- ...
- break;
-
- case 1:
- int fine; // compiler makes room in switch scope
- fine = 10; // compiler can assign later
- ...
- break;
-
- case 2:
- { // new level of scope inside braces!
- int alsofine=10; // no jumps in this set of { }? Ok.
- ...
- }
- break;
-
- ...
- }
- }
-
- Bothersome, isn't it.
-
- --Norm
-
- jweddle@uswnvg.com (Jacque Weddle) wrote:
-
- >Hello,
-
- >I'm a c person trying to compile some c++ code I got
- >off the net. I get the error message
-
- >"Log.cc", line 261: error: jump past initializer (did you forget a '{ }'?)
-
- >I don't see a problem at the designated line number. Whats an
- >initializer?
- >I know this isn't much information but if someone could please
- >tell me what kind of thing I should look for to fix this I'd much
- >appreciate it.
-
- >TIA,
- >Jacque
-
-
-
-